package com.open4cn.simulator.core.connector.serialport;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description
 * @Email yinxiaopeng@zj.tech
 * @date 2022-06-11 17:07
 */
public interface SerialPortHandler {

    /**
     * 设置下一个
     *
     * @param serialPortHandler
     */
    void next(SerialPortHandler serialPortHandler);

    /**
     * 获取下一个
     *
     * @return
     */
    SerialPortHandler next();


    default boolean hasNext() {
        return null != next();
    }

}
